//
//  LotteryOrderView.m
//  DSBet
//
//  Created by 李春阳 on 2018/5/21.
//  Copyright © 2018年 Bill. All rights reserved.
//

#import "LotteryOrderView.h"

@interface LotteryOrderView ()

@property (weak, nonatomic) IBOutlet UILabel *orderLbl;
@property (weak, nonatomic) IBOutlet UILabel *touzhuNumLbl;
@property (weak, nonatomic) IBOutlet UILabel *kaijiangTimeLbl;
@property (weak, nonatomic) IBOutlet UILabel *jiangjinLbl;

@property (weak, nonatomic) IBOutlet UILabel *zhudanLbl;
@property (weak, nonatomic) IBOutlet UILabel *beishuLbl;

@property (weak, nonatomic) IBOutlet UIView *twoBtnBottomView;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@property (weak, nonatomic) IBOutlet UIView *oneBtnBottomView;

@end

@implementation LotteryOrderView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (LotteryOrderView *)initView{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LotteryOrderView class]) owner:nil options:nil] lastObject];
}

- (IBAction)contrlInfo:(id)sender {
    // 操作指南
    if (self.contrlInfoBtnClickedBlock) {
        self.contrlInfoBtnClickedBlock();
    }
}

- (IBAction)oneMoreBtnClicked:(id)sender {
    if (self.twoBtnOneMoreBtnClickedBlock) {
        [self removeFromSuperview];
        self.twoBtnOneMoreBtnClickedBlock();
    }
}

- (IBAction)chakanOrderBtnClicked:(id)sender {
    
    if (self.twoBtnLookDetailBtnClickedBlock) {
        [self removeFromSuperview];
        self.twoBtnLookDetailBtnClickedBlock();
    }

}

- (IBAction)oneBtnBottomOneMoreBtnClicked:(id)sender {
    if (self.oneBtnOneMoreBtnClickedBlock) {
        self.oneBtnOneMoreBtnClickedBlock();
    }
}
- (IBAction)closeBtnClicked:(id)sender {
    [self removeFromSuperview];
}

#pragma mark - setter methods
- (void)setOrderNumber:(NSString *)orderNumber{
    _orderNumber = orderNumber;
    _orderLbl.text = _orderNumber;
}

- (void)setMyNumber:(NSString *)myNumber{
    _myNumber = myNumber;
    _touzhuNumLbl.text = _myNumber;
}

- (void)setOpenTime:(NSString *)openTime{
    _openTime = openTime;
    _kaijiangTimeLbl.text = _openTime;
}

- (void)setZhudan:(NSString *)zhudan{
    _zhudan = zhudan;
    _zhudanLbl.text = _zhudan;
}

- (void)setJiangchijine:(NSString *)jiangchijine{
    _jiangchijine = jiangchijine;
    _jiangjinLbl.text = _jiangchijine;
}

- (void)setBeishu:(NSString *)beishu{
    _beishu = beishu;
    _beishuLbl.text = _beishu;
}

- (void)setIsTwoBtn:(BOOL)isTwoBtn{
    _isTwoBtn = isTwoBtn;
    if (_isTwoBtn) {
        _oneBtnBottomView.hidden = YES;
        _twoBtnBottomView.hidden = NO;
        
    }else{
        _oneBtnBottomView.hidden = NO;
        _twoBtnBottomView.hidden = YES;
    }
}

- (void)setIsHiddenBottom:(BOOL)isHiddenBottom{
    _isHiddenBottom = isHiddenBottom;
    if (_isHiddenBottom) {
        _oneBtnBottomView.hidden = YES;
        _twoBtnBottomView.hidden = YES;
        _lineView.hidden = YES;
    }
}

- (void)setAttributedMyNumber:(NSMutableAttributedString *)attributedMyNumber{
    _attributedMyNumber = attributedMyNumber;
    _touzhuNumLbl.attributedText = _attributedMyNumber;
}
@end
